package com.bookmall.product.feign;

import com.bookmall.product.domain.vo.MemberLikeBooksVo;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description:
 * @Author 胡菜鸡
 * @Create 2022-04-08-16:51
 */
@FeignClient("bookmall-member")
public interface MemberInfoFeignService {

    /**
     * 获取会员信息详细信息
     */
    @GetMapping("/member/info/{id}")
    public AjaxResult getInfo(@PathVariable("id") String id);

    /**
     * 根据学生学号获取会员详细信息
     * @author 胡菜鸡
     * @date 2022/4/8 17:38
     */
    @GetMapping(value = "/member/info/stu/{stuId}")
    public AjaxResult getInfoByStuId(@PathVariable("stuId") String stuId);

    /**
     * 新增用户喜欢书籍
     * @author 胡菜鸡
     * @date 2022/5/3 19:26
     */
    @PostMapping("/member/likes")
    public AjaxResult addBookLikes(@RequestBody MemberLikeBooksVo memberLikeBooks);
}
